<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core" xmlns:p="http://primefaces.org/ui" xmlns:hf="http://happyfaces.org/happyfaces" xmlns:c="http://java.sun.com/jsp/jstl/core">

<ui:composition>

	<c:if test="${empty edit}">
		<c:set var="edit" value="#{backingBean.edit}" />
	</c:if>
	
	<c:if test="${empty formId}">
		<c:set var="formId" value="formId" />
	</c:if>

	<c:if test="${empty ajaxSubmit}">
		<c:set var="ajaxSubmit" value="false" />
	</c:if>

	<c:if test="${empty columns}">
		<c:set var="columns" value="2" />
	</c:if>

	<c:if test="${empty showFormButtons}">
		<c:set var="showFormButtons" value="true" />
	</c:if>

	<c:if test="${!empty backingBean}">
		<c:set var="entity" value="#{backingBean.entity}" />
	</c:if>
	<c:if test="${!empty entity}">
		<c:set var="entity" value="#{entity}" />
	</c:if>

	<!-- <p:panel> -->
		<f:facet name="header">
			<h:outputText value="#{label}" />
		</f:facet>
		<h:form id="mainForm">
			<p:messages id="messages" />
			<h:panelGrid columns="#{columns}" columnClasses="#{columnClasses}">
				<ui:insert />
				<hf:formButtons show="#{showFormButtons}" columns="3" />
			</h:panelGrid>
		</h:form>
	<!-- </p:panel>  -->

</ui:composition>

</html>
